#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* my_strstr(char*str1,char*str2)
{
	int i=strlen(str2);
	
	while(str1)
	{
		int j = 0;
		char* s2 = str2;
		for (;j<i;j++)
		{
			if (*str1 != *str2)
			{
				break;
			}
			str1++;
			s2++;
		}
		if (j == i)
		return str1-i;
	}

}
int main()
{
	char arr1[] = "abcdefdef";
	char arr2[] = "efd";
	//printf("%s", strstr(arr1, arr2));
	printf("%s", my_strstr(arr1, arr2));
}